import request from '@/utils/request'




var url = process.env.VUE_APP_SUM_PUB;

export function getList(data) {
  return request({
    url: url + '/website-announcement/list',
    method: 'post',
    data: data
  })
}

// 查询公告列表
export function List(query) {
  return request({
    url: '/system/notice',
    method: 'get',
    params: query
  })
}

// 查询公告详细
export function Show(noticeId) {
  console.log('aaaie',noticeId)
  return request({
    url: '/system/notice/' + noticeId,
    method: 'get'
  })
}

// 新增公告
export function Add(data) {
  return request({
    url: '/system/notice',
    method: 'post',
    data: data
  })
}

// 修改公告
export function Update(data) {
  return request({
    url: '/system/notice/'+data.id,
    method: 'put',
    data: data
  })
}

// 删除公告
export function Delete(noticeId) {
  return request({
    url: '/system/notice/' + noticeId,
    method: 'delete'
  })
}




export function detail(data) {
  return request({
    url: url + '/website-announcement/detail',
    method: 'post',
    data: data
  })
}


export function info(data) {
  return request({
    url: url + '/website-announcement/info',
    method: 'post',
    data: data
  })
}



//消息列表(与公告不同)
export function messageList(data) {
  return request({
    url: url + '/business-admin/message-manage/message/list',
    method: 'post',
    data: data
  })
}


//关闭弹框，未读消变为已读消息
export function messageUpdate(data) {
  return request({
    url: url + '/business-admin/message-manage/message/modify',
    method: 'post',
    data: data
  })
}

